/*
 * Copyright (C) 2019 xuexiangjys(xuexiangjys@163.com)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

package com.xuexiang.xgithubclient.core.db.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.util.Date;


/**
 *
 *
 * @author xuexiang
 * @since 2019-07-05 00:40
 */
@DatabaseTable(tableName = "trace_user")
public class TraceUser {

    @DatabaseField(generatedId = true)
    private long Id;
    @DatabaseField
    private String login;
    @DatabaseField
    private String name;
    @DatabaseField
    private String avatarUrl;
    @DatabaseField
    private int followers;
    @DatabaseField
    private int following;
    @DatabaseField
    private Date startTime;
    @DatabaseField
    private Date latestTime;
    @DatabaseField
    private int traceNum;

    public TraceUser() {
    }

    public TraceUser(String login) {
        this.login = login;
    }

    public TraceUser(String login, String name, String avatarUrl, int followers, int following, Date startTime, Date latestTime, int traceNum) {
        this.login = login;
        this.name = name;
        this.avatarUrl = avatarUrl;
        this.followers = followers;
        this.following = following;
        this.startTime = startTime;
        this.latestTime = latestTime;
        this.traceNum = traceNum;
    }

    public long getId() {
        return Id;
    }

    public TraceUser setId(long id) {
        Id = id;
        return this;
    }

    public String getLogin() {
        return login;
    }

    public TraceUser setLogin(String login) {
        this.login = login;
        return this;
    }

    public String getName() {
        return name;
    }

    public TraceUser setName(String name) {
        this.name = name;
        return this;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public TraceUser setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
        return this;
    }

    public int getFollowers() {
        return followers;
    }

    public TraceUser setFollowers(int followers) {
        this.followers = followers;
        return this;
    }

    public int getFollowing() {
        return following;
    }

    public TraceUser setFollowing(int following) {
        this.following = following;
        return this;
    }

    public Date getStartTime() {
        return startTime;
    }

    public TraceUser setStartTime(Date startTime) {
        this.startTime = startTime;
        return this;
    }

    public Date getLatestTime() {
        return latestTime;
    }

    public TraceUser setLatestTime(Date latestTime) {
        this.latestTime = latestTime;
        return this;
    }

    public int getTraceNum() {
        return traceNum;
    }

    public TraceUser setTraceNum(int traceNum) {
        this.traceNum = traceNum;
        return this;
    }

    @Override
    public String toString() {
        return "TraceUser{" +
                "Id=" + Id +
                ", login='" + login + '\'' +
                ", name='" + name + '\'' +
                ", avatarUrl='" + avatarUrl + '\'' +
                ", followers=" + followers +
                ", following=" + following +
                ", startTime=" + startTime +
                ", latestTime=" + latestTime +
                ", traceNum=" + traceNum +
                '}';
    }
}
